import request from '@/utils/request'

//上传文件 
export function upload() {
  //return process.env.VUE_APP_BASE_API + '/common/upload';
  return process.env.VUE_APP_BASE_API + '/common/upload';
}

/**
 * 下载文件
 * @param {文件id} fileId 
 * @returns 
 */
export function download(fileId) {
  return request({
    url: '/common/download'+fileId,
    method: 'get',

  })
}



/**
 * 打开文件  (直接在浏览器打开)
 * @param {文件id} fileId 
 * @returns 
 */
 export function openFile(fileId) {
  return request({
    url: '/common/open_file'+fileId,
    responseType:"blob" ,
    method: 'get',

  })
}

